package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;


/**
 * <p> 标题: 意见反馈留言表, tc_feedback_info 数据类 POJO
 * <p>Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @author you name
 * @version 1.0
*/

public class Feedback extends BaseEntity {
   
   //date formats
   public static final String FORMAT_CREATE_TIME = DATE_TIME_FORMAT;
   
   //columns START
   /**序列*/
   private java.lang.Integer id;
   /**内容*/
   private java.lang.String content;
   /**创建时间*/
   private java.sql.Timestamp createTime;
   /**用户ID*/
   private java.lang.String userId;
   /**用户名*/
   private java.lang.String userName;   
   
   /**类型:1意见,2反馈,3留言,4其它*/
   private java.lang.String types;
   /**联系方式*/
   private java.lang.String contact;
   private java.util.ArrayList idList;
   //columns END

	public Feedback(){
	}

	public Feedback(
		java.lang.Integer id
	){
		this.id = id;
	}

   public void setId(java.lang.Integer value) {
      this.id = value;
   }
   
   public java.lang.Integer getId() {
      return this.id;
   }
   public void setContent(java.lang.String value) {
      this.content = value;
   }
   
   public java.lang.String getContact() {
	return contact;
}

public java.lang.String getUserName() {
	return userName;
}

public void setUserName(java.lang.String userName) {
	this.userName = userName;
}

public void setContact(java.lang.String contact) {
	this.contact = contact;
}

public java.lang.String getContent() {
      return this.content;
   }
   public String getCreateTimeString() {
      return date2String(getCreateTime(), FORMAT_CREATE_TIME);
   }
   
   public void setCreateTimeString(String value) {
      setCreateTime(string2Date(value, FORMAT_CREATE_TIME,java.sql.Timestamp.class));
   }
   
   public void setCreateTime(java.sql.Timestamp value) {
      this.createTime = value;
   }
   
   public java.sql.Timestamp getCreateTime() {
      return this.createTime;
   }
   public void setUserId(java.lang.String value) {
      this.userId = value;
   }
   
   public java.lang.String getUserId() {
      return this.userId;
   }
   public void setTypes(java.lang.String value) {
      this.types = value;
   }
   
   public java.lang.String getTypes() {
      return this.types;
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("Id",getId())
         .append("Content",getContent())
         .append("CreateTime",getCreateTime())
         .append("UserId",getUserId())
         .append("Types",getTypes())
         .append("Contact",getContact())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getId())
         .append(getContent())
         .append(getCreateTime())
         .append(getUserId())
         .append(getTypes())
          .append(getContact())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof Feedback == false) return false;
      if(this == obj) return true;
      Feedback other = (Feedback)obj;
      return new EqualsBuilder()
         .append(getId(),other.getId())
         .append(getContent(),other.getContent())
         .append(getCreateTime(),other.getCreateTime())
         .append(getUserId(),other.getUserId())
         .append(getTypes(),other.getTypes())
          .append(getContact(),other.getContact())
         .isEquals();
   }
   
   
}

